package com.zw.yzk.kabu.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;


/**
 * Created by zhanwei on 2017/3/12.
 */

public class SubmitOrder implements Parcelable {
    private int shopId;//商品id
    private int receiverInfoId;//收货信息id
    private String shopName;//商铺名称
    private int shopGoodsCount;//商品总数
    private float goodsPrice;//商品总额
    private ArrayList<SubmitGoods> goodsList;//商品列表
    private float shopFreight;//店铺运费

    public float getShopFreight() {
        return shopFreight;
    }

    public void setShopFreight(float shopFreight) {
        this.shopFreight = shopFreight;
    }

    public int getShopGoodsCount() {
        return shopGoodsCount;
    }

    public void setShopGoodsCount(int shopGoodsCount) {
        this.shopGoodsCount = shopGoodsCount;
    }

    public float getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(float goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public int getReceiverInfoId() {
        return receiverInfoId;
    }

    public void setReceiverInfoId(int receiverInfoId) {
        this.receiverInfoId = receiverInfoId;
    }

    public ArrayList<SubmitGoods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(ArrayList<SubmitGoods> goodsList) {
        this.goodsList = goodsList;
    }


    public SubmitOrder() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.shopId);
        dest.writeInt(this.receiverInfoId);
        dest.writeString(this.shopName);
        dest.writeInt(this.shopGoodsCount);
        dest.writeFloat(this.goodsPrice);
        dest.writeTypedList(this.goodsList);
        dest.writeFloat(this.shopFreight);
    }

    protected SubmitOrder(Parcel in) {
        this.shopId = in.readInt();
        this.receiverInfoId = in.readInt();
        this.shopName = in.readString();
        this.shopGoodsCount = in.readInt();
        this.goodsPrice = in.readFloat();
        this.goodsList = in.createTypedArrayList(SubmitGoods.CREATOR);
        this.shopFreight = in.readFloat();
    }

    public static final Creator<SubmitOrder> CREATOR = new Creator<SubmitOrder>() {
        @Override
        public SubmitOrder createFromParcel(Parcel source) {
            return new SubmitOrder(source);
        }

        @Override
        public SubmitOrder[] newArray(int size) {
            return new SubmitOrder[size];
        }
    };
}
